<template>
    <div id="videoContent">
        <div class="playVideo">
            <video controls width="100%" height="700px" autoplay :src="theVideoSrc"></video>
        </div>
    </div>
</template>

<script>
import {setCookie,getCookie} from '../assets/js/cookie.js'
import { setTimeout } from 'timers';
export default {
    data(){
        return{
            theVideoSrc:''
        }
    },
    created(){
        setTimeout(function(){
        this.getVideoSrc()
        }.bind(this),3000)
    },
    methods:{
        getVideoSrc(){
            this.theVideoSrc="http://localhost:8080/uploadfilecover/uploadfile/"+getCookie('videoCode')
        }
    },
    props:['videoSrc']
}
</script>

<style scoped>
.playVideo{
    width: 100%;
    height: 30%;
}
</style>
